﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;

public partial class admin_Admin_AdminT : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


    }

    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        string sql1 = TextArea1.Value.Trim();
        OleDbConnection conn = new OleDbConnection(DB.conn);
        OleDbCommand mycom = new OleDbCommand(sql1, conn);
        try
        {
            conn.Open();
            mycom.ExecuteNonQuery();
        }
        catch (OleDbException ex)
        {
            Label1.Text = ex.Message;
        }
        finally
        {
            conn.Close();
        }
        if (Label1.Text == "")
        {
            Label2.Text = "执行成功！";
        }
    }
}
